import request from "../utils/request";

export function getPosts(page = 1, pageSize = 15) {
  return request.get('/invitations', {
    params: {page, pageSize}
  })
}

export function getPost(id) {
  return request.get('/invitations/' + id);
}

export function addPost(post) {
  return request.post('/invitations', post);
}

export function deletePost(id) {
  return request.delete('/invitations', {
    params: {id}
  })
}

export function updatePost(post) {
  return request.patch('/invitations', post);
}
